const logCfg = {
  appenders: {
    console: {
      type: 'console'
    },
    eth: {
      type: 'dateFile',
      filename: `${__dirname}/../logs/eth/async`,
      alwaysIncludePattern: true,
      pattern: 'yyyy-MM-dd.log'
    },
    ethHandle: {
      type: 'dateFile',
      filename: `${__dirname}/../logs/eth/handle`,
      alwaysIncludePattern: true,
      pattern: 'yyyy-MM-dd.log'
    },
    ethExtract: {
      type: 'dateFile',
      filename: `${__dirname}/../logs/eth/extract`,
      alwaysIncludePattern: true,
      pattern: 'yyyy-MM-dd.log'
    },
    debug: {
      type: 'dateFile',
      filename: `${__dirname}/../logs/debug/debug`,
      alwaysIncludePattern: true,
      pattern: 'yyyy-MM-dd.log'
    },
    web: {
      type: 'dateFile',
      filename: `${__dirname}/../logs/web/server`,
      alwaysIncludePattern: true,
      pattern: 'yyyy-MM-dd.log'
    },
    task: {
      type: 'dateFile',
      filename: `${__dirname}/../logs/task/transfer`,
      alwaysIncludePattern: true,
      pattern: 'yyyy-MM-dd.log'
    }
  },
  categories: {
    default: {
      appenders: ['console'],
      level: 'ALL'
    },
    eth: {
      appenders: ['eth','console'],
      level: 'ALL'
    },
    ethHandle: {
      appenders: ['ethHandle','console'],
      level: 'ALL'
    },
    ethExtract: {
      appenders: ['ethExtract','console'],
      level: 'ALL'
    },
    debug: {
      appenders: ['debug','console'],
      level: 'ALL'
    },
    web: {
      appenders: ['web', 'console'],
      level: 'ALL'
    },
    task: {
      appenders: ['task', 'console'],
      level: 'ALL'
    }
  },
  pm2: true
}

export {
  logCfg
}

